package com.ask.forMe.langchain4j.agent;

import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.TokenStream;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
        chatModel = "openAiChatModel",
        chatMemoryProvider = "chatMemoryProviderNoDuration",
        tools = "xiaozhiAgentTools"
)
public interface MyAgentMemory {
    @SystemMessage("你是一个智能聊天助手, 可以帮助用户查询和处理订单")
    String chat(@MemoryId int memoryId, @UserMessage String message);
}
